﻿namespace Baddies.Events
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Linq;
    using System.Text;

    /// <summary>
    /// Arguments for the GetGameServices event.
    /// </summary>
    public class GetGameServicesArg : EventArgs
    {
        /// <summary>
        /// Services class in the Game class.
        /// </summary>
        private IServiceProvider service = null;

        /// <summary>
        /// Gets or sets the service.
        /// </summary>
        /// <value>Reference to the service.</value>
        public IServiceProvider Service
        {
            get 
            {
                Debug.Assert(this.service != null, "Services not found!");
                return this.service; 
            }

            set 
            {
                Debug.Assert(this.service == null, "Multiple Services found!");
                this.service = value; 
            }
        }

        /// <summary>
        /// Text representation of this class.
        /// </summary>
        /// <returns>String with the textual representation of the class.</returns>
        public override string ToString()
        {
            return "GetServices";
        }
    }
}
